<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>我的案例详情</title>


    <!-- Expand styles -->
    <link href="../css/app/app.css" rel="stylesheet">
    <link href="../css/app/default.css" rel="stylesheet">
    <link href="../css/mui/mui.css" rel="stylesheet">
    <link href="../css/app/swiper.css" rel="stylesheet">


</head>

<body>

    <!-- header -->
    <div>
        <!-- 轮播 -->
        <div class="indexHead">
            <div class="swiper-container">
                <div class="swiper-wrapper img-cls">


                </div>
                <!-- Add Pagination -->
                <div class="swiper-pagination"></div>
            </div>
        </div>
        <div class='widget-body widget-default margin-b-10'>
            <div class="display-flex align-items-center">
                <span class="px-content font-15 tuli-bg-b elli1" id="tranType"></span>
                <p class="black1 font-16 font-weight no-margin elli1" id="title">
                </p>
            </div>
        </div>
        <!-- 内容 -->
        <div class="display-flex justify-content-between align-items-center details-box">
            <span>培训时间</span>
            <span id="tranBeginTime"></span>
        </div>
        <div class="display-flex justify-content-between align-items-center details-box">
            <span>培训地址</span>
            <span id="tranAddress"></span>
        </div>
        <div class="display-flex justify-content-between align-items-center details-box">
            <span>培训人数</span>
            <span id="tranPeopleNum"></span>
        </div>

        <div class="display-flex justify-content-between align-items-center details-box">
            <span>培训老师</span>
            <span id="teacher"></span>
        </div>
        <div class="display-flex justify-content-between align-items-center details-box">
            <span>培训主办方</span>
            <span id="tranSponsors"> </span>
        </div>
        <!--  -->

        <!--  -->

    </div>



    <script src="../js/dsbridge.js"></script>
    <script src="../js/jquery.js"></script>
    <script src="../js/mui/mui.js"></script>
    <script src="../js/mui/mui.picker.min.js"></script>
    <script src="../js/layer.js"></script>
    <script src="../js/app/app-base.js"></script>
    <script src="../js/app/app-url.js"></script>
    <script src="../js/app/app-ajax.js"></script>
    <script src="../js/swiper.min.js"></script>
    <script>
        var id = localStorage.getItem("case-id");
        $(document).ready(function () {

            var data = {
                id: id
            }
            getServerData(url_queryOffLineDetail, data);
        })



        function getServerDataSuccess(url, data) {

            var dataInfo = data.data;
            var html = '';
            $.each(dataInfo.fileInfos, function (index, item) {
                html += '<div class="swiper-slide"><img src="' + showSmallImg(item.fileId) + '" /></div>';
            })

            $(".img-cls").html(html);

            if (dataInfo.tranType != null)
                $("#tranType").html(dataInfo.tranType.name);
            $("#title").html(dataInfo.title);
            $("#tranBeginTime").html(dataInfo.tranBeginTime + '~' + dataInfo.tranEndTime);

            var address = dataInfo.province.provinceName;
            if (!isEmpty(dataInfo.city))
                address += dataInfo.city.cityName;
            if (!isEmpty(dataInfo.county))
                address += dataInfo.county.countyName;
            if (!isEmpty(dataInfo.tranAddress))
                address += dataInfo.tranAddress;
            $("#tranAddress").html(address);
            $("#tranPeopleNum").html(dataInfo.tranPeopleNum + '人');
            $("#teacher").html(dataInfo.teacher);
            $("#tranSponsors").html(dataInfo.tranSponsors);



            var swiper = new Swiper(".swiper-container", {
                autoplay: 2000,
                // loop: true,
                pagination: '.swiper-pagination',
                paginationType: 'custom', //这里分页器类型必须设置为custom,即采用用户自定义配置
                //下面方法可以生成我们自定义的分页器到页面上
                paginationCustomRender: function (swiper, current, total) {
                    var customPaginationHtml = "";
                    for (var i = 0; i < total; i++) {
                        //判断哪个分页器此刻应该被激活
                        if (i == (current - 1)) {
                            customPaginationHtml +=
                                '<span class="swiper-pagination-customs swiper-pagination-customs-active"></span>';
                        } else {
                            customPaginationHtml += '<span class="swiper-pagination-customs"></span>';
                        }
                    }
                    return customPaginationHtml;
                }

            });

        }
    </script>



</body>

</html>